package org.csu.mypetstore.domain.PO;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@TableName("orders")
@JsonIgnoreProperties(value = {"handler"})
//json序列化的时候空的数据不被包含
@JsonInclude(JsonInclude.Include.NON_NULL)
@Data
public class Order implements Serializable {

    private static final long serialVersionUID = 6321792448424424931L;

    @TableField("orderId")
    private int orderId;
    @TableField("username")
    private String username;
    @TableField("orderDate")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date orderDate;
    @TableField("shipAddress1")
    private String shipAddress1;
    @TableField("shipAddress2")
    private String shipAddress2;
    @TableField("shipCity")
    private String shipCity;
    @TableField("shipProvince")
    private String shipProvince;
    @TableField("shipZip")
    private String shipZip;
    @TableField("shipCountry")
    private String shipCountry;
    private String courier;
    @TableField("totalPrice")
    private BigDecimal totalPrice;
    @TableField("shipToFirstName")
    private String shipToFirstName;
    @TableField("shipToLastName")
    private String shipToLastName;
}
